#include "Operation.h"


Operation::Operation(char ch, int nNum1, int nNum2) :
m_ch(ch), m_nNum1(nNum1), m_nNum2(nNum2)
{
}


Operation::~Operation(void)
{
}

int Operation::Caculation()
{
	int Sum = 0;
	switch(m_ch)
	{
	case '+':
		Sum = m_nNum1 + m_nNum2;
	case '-':
		Sum = m_nNum1 - m_nNum2; 
	default:
		Sum = m_nNum1 + m_nNum2;
		break;
	}
	return Sum;
}
